﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace CommonLibrary
{
    public class DeviceEnableDemo
    {
        private static HardwareClass.HardwareInfo device;

        public static void RunDemo(bool enable)
        {
            IList<HardwareClass.HardwareInfo> _HardwareInfo = HardwareClass.GetHardwareTable();

            List<HardwareClass.HardwareInfo> device = _HardwareInfo.Where(p => p.DeviceName.Contains("触摸板")).ToList();

            // every type of device has a hard-coded GUID, this is the one for mice
            Guid mouseGuid = device[0].ClassGuid;

            // get this from the properties dialog box of this device in Device Manager
            

            DeviceHelper.SetDeviceEnabled(mouseGuid, "", true);
        }
    }
}
